<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/WEB-INF/tlds/c.tld" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<script language="javascript">
    function jump(n) {
        document.getElementById("currentPage").value = n;
        document.forms[0].submit();
    }
</script>
<c:set var="path" value=" ${pageContext.request.contextPath}"
       scope="request"/>
<table width="100%" height="100%">
    <tr>
        <td height="30" align="right" valign="middle">
            当前第
            <c:out value="${pageInfo.currentPage}"/>
            页/共
            <c:out value="${pageInfo.totalPages}"/>
            页 共
            <c:out value="${pageInfo.totalRows}"/>
            条记录&nbsp;&nbsp;
            <c:choose>
                <c:when test="${empty pageInfo || pageInfo.currentPage<=1}"> 首页 </c:when>
                <c:otherwise> <a href="javaScript:jump('1')"> 首页</a></c:otherwise>
            </c:choose>
            &nbsp;
            <c:choose>
                <c:when test="${empty pageInfo || pageInfo.currentPage<=1}">上一页 </c:when>
                <c:otherwise> <a href='javaScript:jump("${pageInfo.currentPage-1}")'>上一页</a></c:otherwise>
            </c:choose>
            &nbsp;
            <c:choose>
                <c:when test="${empty pageInfo || pageInfo.currentPage>=pageInfo.totalPages}">下一页</c:when>
                <c:otherwise> <a href='javaScript:jump("${pageInfo.currentPage+1}")'>下一页</a></c:otherwise>
            </c:choose>
            &nbsp;
            <c:choose>
                <c:when test="${empty pageInfo || pageInfo.currentPage>=pageInfo.totalPages}">尾页</c:when>
                <c:otherwise> <a href='javaScript:jump("${pageInfo.totalPages}")'>尾页</a></c:otherwise>
            </c:choose>
            &nbsp;
            <%--<s:select list="{10,20,30,40,50}" name="pageInfo.pageSize" onchange="%{pageInfo.method}"--%>
                      <%--theme="simple"/> 条/页--%>
            转到第<s:select list="%{pageInfo.pageList}" name="pageInfo.currentPage" id="currentPage"
                      onchange="%{pageInfo.method}" theme="simple"/>

            页&nbsp;
        </td>
    </tr>
</table>
